package com.probiz.estoresa.content.web.action;

import javax.servlet.http.HttpServletRequest;

import org.springframework.validation.BindException;

import com.probiz.estore.common.model.content.ContentStat;
import com.probiz.estore.content.service.ContentStatManager;
import com.probiz.estore.core.controller.GenericStoreAdminController;

public class ContentStatController extends GenericStoreAdminController<ContentStat> {
    private ContentStatManager contentStatManager = null;

    public void setContentStatManager(ContentStatManager inMgr) {
        this.contentStatManager = inMgr;
    }

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.probiz.estore.core.controller.GenericController#getEntityName(java.lang.Object)
	 */
	@Override
	protected String getEntityName(ContentStat entity) {
		return entity.getContentStatName();
	}


	/*
	 * (non-Javadoc)
	 * 
	 * @see com.probiz.estore.core.controller.BaseController#initController()
	 */
	@Override
	protected void initController() throws Exception {
		mgr = contentStatManager;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.probiz.estore.core.controller.GenericController#onSave(javax.servlet.http.HttpServletRequest,
	 *      java.lang.Object, org.springframework.validation.BindException)
	 */
	@Override
	protected void preSave(HttpServletRequest request, ContentStat entity, BindException errors) {
	}

}
